<script lang="tsx">
  import { defineComponent, ref, unref } from 'vue';
  import { Tooltip } from 'ant-design-vue';
  import { SearchOutlined } from '@ant-design/icons-vue';
  import { useI18n } from '/@/hooks/web/useI18n';
  import { router } from '/@/router';

  /**
   * 全局搜索
   * */
  export default defineComponent({
    name: 'AppSearch',
    setup() {
      const { t } = useI18n();

      function changeModal() {
        console.log(router)
        router.push({path:'/admin/zygl/AllSearch'});
      }

      return () => {
        return (
          <div class="p-1" onClick={changeModal.bind(null)}>
            <Tooltip>
              {{
                title: () => t('common.searchText'),
                default: () => <SearchOutlined />,
              }}
            </Tooltip>
          </div>
        );
      };
    },
  });
</script>
